package com.qst.system.controller;

import com.qst.common.core.controller.BaseController;
import com.qst.common.core.page.TableDataInfo;
import com.qst.system.domain.vo.OverdueVo;
import com.qst.system.service.IOverdueService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 逾期统计图表Controller
 * 
 * @author 86182
 * @date 2025-08-23
 */
@RestController
@RequestMapping("/system/overduechart")
public class OverdueChartController extends BaseController {

    @Autowired
    private IOverdueService overdueService;

    /**
     * 查询逾期列表用于图表统计
     */
    @PreAuthorize("@ss.hasPermi('system:overduechart:list')")
    @GetMapping("/list")
    public TableDataInfo list(OverdueVo overdueVo) {
        startPage();
        List<OverdueVo> list = overdueService.selectOverdueList(overdueVo);
        return getDataTable(list);
    }
}